Writing Resilient Unit Tests

By Andrew Wilcox I happened to be looking at a unit test I wrote a couple months ago and was dismayed to realize it wasn’t working any longer: test(“don’t launch the rocket in stormy weather”, function () { setup_rocket_systems_controller(); setup_fake_ground_based_internet(); set_weather_to_stormy(); equal(ready_to_launch(), false); }); Today this test will always go green — regardless of whether the code launches the rocket in … Continue reading Writing Resilient Unit Tests